<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>style (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
       <span class="fn">testing.ui.style</span>
</div>

<hr/>


  <h2>Classes</h2>
   
<br/>

  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>




  <h2>Global Functions</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.ui.style.assertStructureMatchesReference"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.testing.ui.style.</span><span class="entryName">assertStructureMatchesReference<span class="args">(<span class="arg">element</span>,&nbsp;<span class="arg">referenceId</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Tests that the structure, node names, and classes of the given element are
the same as the reference structure with the given id. Throws an error if the
element doesn't have the same nodes at each level of the DOM with the same
classes on each. The test ignores all DOM structure within content nodes.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">element</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/DOM/Node">Node</a></span>
        <div class="entryOverview">The root node of the DOM structure to test.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">referenceId</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The id of the container for the reference
  structure to test against.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_ui_style.js.source.html#line95">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.testing.ui.style.assertStructureMatchesReferenceInner_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.testing.ui.style.</span><span class="entryName">assertStructureMatchesReferenceInner_<span class="args">(<span class="arg">element</span>,&nbsp;<span class="arg">reference</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       A recursive function for comparing structure, node names, and classes between
a test and reference DOM structure. Throws an error if one of these things
doesn't match. Used internally by
<code> goog.testing.ui.style.assertStructureMatchesReference</code>.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">element</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/DOM/Node">Node</a></span>
        <div class="entryOverview">DOM element to test.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">reference</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/DOM/Node">Node</a></span>
        <div class="entryOverview">DOM element to use as a reference (test against).</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_ui_style.js.source.html#line111">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.ui.style.getElementChildren"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.testing.ui.style.</span><span class="entryName">getElementChildren<span class="args">(<span class="arg">element</span>)</span>
        </span>
        &#8658; <span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span>!</span><span class="type"><a href="https://developer.mozilla.org/en/DOM/Node">Node</a></span>&gt;
      </div>


     <div class="entryOverview">
       Returns an array of all element children of a given node.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">element</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/DOM/Node">Node</a></span>
        <div class="entryOverview">The node to get element children of.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span>!</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;<span>!</span><span class="type"><a href="https://developer.mozilla.org/en/DOM/Node">Node</a></span>&gt;&nbsp;
            An array of all the element children.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_ui_style.js.source.html#line62">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.ui.style.getReferenceNode"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.testing.ui.style.</span><span class="entryName">getReferenceNode<span class="args">(<span class="arg">referenceId</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/DOM/Node">Node</a></span>
      </div>


     <div class="entryOverview">
       Returns a reference to the first element child of a node with the given id
from the page loaded into the reference iFrame. Used to retrieve a particular
reference DOM structure to test against.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">referenceId</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">The id of a container element for a reference
  structure in the reference page.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/DOM/Node">Node</a></span>&nbsp;
            The root element of the reference structure.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_ui_style.js.source.html#line51">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.ui.style.isContentNode"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.testing.ui.style.</span><span class="entryName">isContentNode<span class="args">(<span class="arg">element</span>)</span>
        </span>
        &#8658; <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>
      </div>


     <div class="entryOverview">
       Tests whether a given node is a "content" node of a reference structure,
which means it is allowed to have arbitrary children.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">element</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/DOM/Node">Node</a></span>
        <div class="entryOverview">The node to test.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span>&nbsp;
            Whether the given node is a content node or not.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_ui_style.js.source.html#line81">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.testing.ui.style.writeReferenceFrame"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.testing.ui.style.</span><span class="entryName">writeReferenceFrame<span class="args">(<span class="arg">referencePath</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Uses document.write to add an iFrame to the page with the reference path in
the src attribute. Used for loading an html file containing reference
structures to test against into the page. Should be called within the body of
the jsunit test page.

     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">referencePath</span>
        : <span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>
        <div class="entryOverview">A path to a reference HTML file.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="local_closure_goog_testing_ui_style.js.source.html#line37">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>



      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package testing.ui</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="testing.ui.style"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
